﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using TalentPools.DAL;
using TalentPools.Model;
namespace TalentPools.BLL
{
    public class CreateresumeManager
    {
        CreateresumeService cs = new CreateresumeService();
        #region 设置简历的公开状态
        /// <summary>
        /// 设置简历的公开状态
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="resumeId"></param>
        /// <returns></returns>
        public string SetResumeState(string username, int resumeId)
        {
            return cs.SetResumeState(username, resumeId);
        }
        #endregion
        #region 添加个人的简历信息
        /// <summary>
        /// 添加个人的简历信息,默认返回false
        /// </summary>
        /// <param name="re">简历信息类</param>
        /// <returns></returns>
        public bool insertresumeInfo(resume re)
        {
            return cs.insertresumeInfo(re);
        }
        #endregion
        #region 查找最新的简历表的ID
        /// <summary>
        /// 查找最新的简历表的ID
        /// </summary>
        /// <returns></returns>
        public int getresumeId(string id)
        {
            return cs.getresumeId(id);
        }
        /// <summary>
        /// 通过登录名和创建时间获取简历表的编号
        /// </summary>
        /// <param name="userId">用户编号</param>
        /// <param name="createTime">简历创建时间</param>
        /// <returns></returns>
        public int GetResumeId(string userId, DateTime createTime)
        {
            return cs.GetResumeId(userId, createTime);
        }
        #endregion
        #region 创建个人求职意向表
        /// <summary>
        /// 创建个人求职意向表，默认返回false
        /// </summary>
        /// <param name="inte">求职意向表对象</param>
        /// <returns></returns>
        public bool createIntention(intention inte)
        {
            return cs.createIntention(inte);
        }
        #endregion
        #region 创建个人培训信息表
        /// <summary>
        /// 创建个人培训信息表
        /// </summary>
        /// <param name="tr"></param>
        /// <returns></returns>
        public bool createTraning(training tr)
        {
            return cs.createTraning(tr);
        }
        /// <summary>
        /// 获取培训信息
        /// </summary>
        /// <param name="resumeId"></param>
        /// <returns></returns>
        public List<training> GetTraining(int resumeId)
        {
            return cs.GetTraining(resumeId);
        }
        #endregion
        #region 创建个人工作表
        /// <summary>
        /// 创建个人工作表
        /// </summary>
        /// <param name="re"></param>
        /// <returns></returns>
        public bool creatRecord(record re)
        {
            return cs.creatRecord(re);
        }
        /// <summary>
        /// 获取工作履历
        /// </summary>
        /// <param name="resumeId"></param>
        /// <returns></returns>
        public List<record> GetRecord(int resumeId)
        {
            return cs.GetRecord(resumeId);
        }
        #endregion
        #region 创建自定义的表
        /// <summary>
        /// 创建自定义的表
        /// </summary>
        /// <param name="cus"></param>
        /// <returns></returns>
        public bool createCustom(custom cus)
        {
            return cs.createCustom(cus);
        }
        /// <summary>
        /// 获取自定义信息
        /// </summary>
        /// <param name="resumeId"></param>
        /// <returns></returns>
        public List<custom> GetCustom(int resumeId)
        {

            return cs.GetCustom(resumeId);
        }
        #endregion
    }
}
